import 'package:flutter/services.dart';

class FlutterBluetoothPrinter {
  final methodChannel = const MethodChannel('flutter_bluetooth_printer');

  Future<Map<dynamic, dynamic>?> startPrint({required Uint8List data}) async {
    final map = await methodChannel
        .invokeMethod<Map<dynamic, dynamic>?>('printerStart', {"data": data});
    return map;
  }

  void openBluetooth() {
    methodChannel.invokeMethod('printerOpenBluetooth');
  }

  void openWifi() {
    methodChannel.invokeMethod('printerOpenWifi');
  }
}
